removed redundant RGBA double registration
authorRupert Weber <gimp@leguanease.org>
Sun, 19 Sep 2010 12:59:07 +0000 (14:59 +0200)
committerØyvind Kolås <pippin@gimp.org>
Thu, 20 Jan 2011 21:42:59 +0000 (21:42 +0000)
"RGBA double2 was registred twice, once per name, once per id.

babl/babl-core.c
babl/babl-model.c

index f66b191eeb1c25d654517501f5d34c8656878d64..00e43e82cfc4a5bae5de2fc93792ad44c2cbec05 100644 (file)
@@ -133,16 +133,6 @@ babl_core_init (void)
     babl_component_from_id (BABL_ALPHA),
     NULL);
 
-  babl_format_new (
-    "id", BABL_RGBA_DOUBLE,
-    babl_model_from_id (BABL_RGBA),
-    babl_type_from_id (BABL_DOUBLE),
-    babl_component_from_id (BABL_RED),
-    babl_component_from_id (BABL_GREEN),
-    babl_component_from_id (BABL_BLUE),
-    babl_component_from_id (BABL_ALPHA),
-    NULL);
-
   /*
      babl_conversion_new (
      babl_model_from_id (BABL_RGBA),
index 11a3dd1c3b43c98b856078745947a378a5ee13db..be2cddeda96f615715ce358331cc96bf0eddb15d 100644 (file)
@@ -244,10 +244,15 @@ static Babl *reference_format (void)
 
 static Babl *construct_double_format (Babl *model)
 {
-  void *argument[42 + 1];
+  void *argument[44 + 1];
   int   args = 0;
   int   i;
 
+  if (model == babl_model_from_id (BABL_RGBA))
+    {
+      argument[args++] = "id";
+      argument[args++] = (void*) BABL_RGBA_DOUBLE;
+    }
   argument[args++] = model;
   argument[args++] = babl_type_from_id (BABL_DOUBLE);